﻿using System;

namespace BinaryToDecimal
{
    class BinaryToDecimal
    {
        static int ConvertBinaryToDecimal(string number)
        {
            int result = 0;
            for (int index = number.Length - 1, shift = 0; index >= 0; index--, shift++)
            {
                result += (number[index] - '0') << shift; //'1' - '0' = 1
            }
            return result;
        }
        static void Main(string[] args)
        {
            Console.WriteLine(ConvertBinaryToDecimal("10000000000000000000000000000000"));
        }
    }
}
